﻿@using KMF.WebUI.Areas.KMFadmin.Models
@using KMF.WebUI.Areas.KMFadmin.CustomHelpers
@using KMF.Common;
@model ContactDto
@{
    ViewBag.Title = "Thêm liên hệ";
    Layout = "~/Areas/KMFadmin/Views/Shared/_layout.cshtml";
}
@section LeftMenu
{
    <ul id="p-quick-menu" class="quick-menu">
        <li class="qmn-info-pro">Thông tin liên hệ</li>
    </ul>
}
<nav>
    <div id="jCrumbs" class="breadCrumb module">
        <ul>
            <li><a href="/Admin/"><i class="bootstrap icon-home"></i></a></li>
            <li><a href="@Url.Action("Index","Contact")">Danh sách liên hệ</a> </li>
            <li><a href="@Url.Action("Add", "Contact")">Thêm liên hệ</a> </li>
        </ul>
    </div>
</nav>
<div class="toolBox">
    @Html.ToolBox(new List<object> { new Add() { ClassCss = "Add", ActionName = "Javascript:void(0)" }, new Back { ClassCss = "Back", ActionName = @Url.Action("Index", "AdminContactList") } })
</div>
@using (Html.BeginForm("AddContact", "AdminContactList", FormMethod.Post, new { @class = "formAddCate", enctype = "multipart/form-data" }))
{
    <div class="box-Info">
        <div class="Info-header">
            <span>Thêm mới liên hệ </span>
        </div>

        <div class="Info-body ib-infopro">

            <table cellpadding="0" cellspacing="0" width="100%" border="0" class="table-info">
                <tr>
                    <td class="tInfoLeft">
                        Tên liên hệ
                    </td>
                    <td class="tInfoRight">
                        @Html.TextBoxFor(m => m.ContactName)
                        @Html.ValidationMessageFor(m => m.ContactName)
                    </td>
                </tr>
                
                <tr>
                    <td class="tInfoLeft">
                        Ảnh đại diện
                    </td>
                    <td class="tInfoRight">
                        <input type="file" name="fileImagePath" />
                    </td>
                </tr>
                <tr>
                    <td class="tInfoLeft">
                        Mô tả
                    </td>
                    <td class="tInfoRight">
                        @Html.TextBoxFor(m => m.Subject)
                    </td>
                </tr>
                <tr>
                    <td class="tInfoLeft">
                        Địa chỉ
                    </td>
                    <td class="tInfoRight">
                        @Html.TextAreaFor(m => m.Address, new { @class = "cssAreaHeight" })
                    </td>
                </tr>
               
                <tr>
                    <td class="tInfoLeft">
                        Điện thoại 
                    </td>
                    <td class="tInfoRight">
                        @Html.TextBoxFor(m => m.Phone, new { @class = "cssInputWidthSmall" })
                        @Html.ValidationMessageFor(m => m.Phone)
                    </td>
                </tr>
                <tr>
                    <td class="tInfoLeft">
                        Email
                    </td>
                    <td class="tInfoRight">
                        @Html.TextBoxFor(m => m.Email)
                        @Html.ValidationMessageFor(m => m.Email)
                    </td>
                </tr>
                
                <tr>
                    <td class="tInfoLeft">
                        Hiển thị
                    </td>
                    <td class="tInfoRight">
                        @Html.CheckBoxFor(m => m.Active, new { @checked = "checked" })
                    </td>
                </tr>
            </table>

        </div>
    </div>

}
@section scripts
{
    <script src="~/Scripts/jquery.validate.min.js"></script>
    <script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>

    <script type="text/javascript">
        SubmitFormUseToolBox($('#Toolbox li.Add a'), $('form'));
    </script>

}
